#!/usr/bin/env python2.7
#-*-coding:utf-8-*-

from sys import argv

script,input_file=argv

def print_all(f):
	print f.read()

def rewind(f):
	print f.seek(0)

def print_a_line(line_count,f):
	print line_count,f.readline()

current_file=open(input_file)

print "first,let's print the whole file.\n"

print_all(current_file)

rewind(current_file)

print "let's print 3 lines"

print_a_line(1,current_file)
print_a_line(2,current_file)
print_a_line(3,current_file)
